package com.springsummer.information.green.beans;

import java.util.Set;

public class NormalEnvironmentImpl implements Environment {

    private NormalPropertyResolver propertyResolver;

    public NormalEnvironmentImpl() {
        NormalPropertyResolver normalPropertyResolver=new NormalPropertyResolver();
        NormalPropertyResolver propertyResolverUse=normalPropertyResolver.loadFromApplicationProps();
        this.propertyResolver = propertyResolverUse;
    }

    @Override
    public String[] getActiveProfiles() {
        return new String[0];
    }

    @Override
    public boolean containsProperty(String name) {
        return propertyResolver.containsProperty(name);
    }

    @Override
    public String getProperty(String name) {
        return propertyResolver.getProperty(name);
    }

    @Override
    public String getProperty(String name, String defaultValue) {
        return propertyResolver.getProperty(name,defaultValue);
    }

    @Override
    public <T> T getProperty(String name, Class<T> targetType) {
        return propertyResolver.getProperty(name,targetType);
    }

    public Set<String> getPropertyNames() {
        return propertyResolver.getPropertyNames();
    }

}
